<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>点击事件失效</title>
    <style>
        .box{
            width: 200px;
            height: 200px;
            background-color: red;
        }
        .a{
            pointer-events: none;
            position: absolute;
            top: 10px;
            left: 10px;
        }
    </style>
</head>
<body>
    <a class="a" href="#1" >Test 1</a>
    <div class="box">

    </div>
    <script>
        let a = document.querySelector('.a')
        let box = document.querySelector('.box')
        a.onclick = function() {
            alert('a')
        }
        box.onclick = function() {
            alert('box')
        }
    </script>
</body>
</html>